-- GENERATED SPELL FOR [Intrepid Ghoul] --


function spell0_31015(pUnit, Event) --@Festering Bite,n/a--
pUnit:FullCastSpellOnTarget(60873,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31015', 15298, 1)
end

function spell1_31015(pUnit, Event) --@Ghoulplosion,n/a--
pUnit:FullCastSpellOnTarget(58137,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31015', 602, 1)
end

function spell2_31015(pUnit, Event) --@Ravenous Claw,Heal--
pUnit:FullCastSpellOnTarget(60872,pUnit)
pUnit:RegisterEvent('Sorts_31015', 661, 1)
end

function Sorts_31015(pUnit, Event)
local choix_sorts_31015 = math.random(0, 2)
if choix_sorts_31015 == 0 then
pUnit:RegisterEvent('spell0_31015', 1, 1)
end
if choix_sorts_31015 == 1 then
pUnit:RegisterEvent('spell1_31015', 1, 1)
end
if choix_sorts_31015 == 2 then
pUnit:RegisterEvent('spell2_31015', 1, 1)
end
end

function mob31015_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31015', math.random(1500, 3000), 1)
end

function mob31015_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31015_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31015_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31015, 1, 'mob31015_Action')
RegisterUnitEvent(31015, 2, 'mob31015_Leave')
RegisterUnitEvent(31015, 3, 'mob31015_Kill')
RegisterUnitEvent(31015, 4, 'mob31015_Die')
